package com.lmaos.basetools.menuList;

public class MenuTest {
	public static void main(String[] args) {
		MenuMg menuMg = new MenuMgImpl();
		MenuItem menuItem1 = new MenuItem("/a_a/b_b/c_c.txt");
		menuItem1.setAsname("测试文件1");
		MenuItem menuItem2 = new MenuItem("/a_a/b_b/d_d.txt");
		menuItem2.setAsname("测试文件2");
		menuMg.addMenuItem(menuItem1);
		menuMg.addMenuItem(menuItem2);
		
		
		System.out.println(menuMg.getMenuItemByURL("/a_a/b_b/c_c.txt"));
		System.out.println(menuMg.getMenuItemByURL("/a_a/b_b/d_d.txt"));
		
		MenuDirectory directory = menuMg.getMenuDirectoryByPath("/");
		directory.getMenuDirectory("/a_a/b_b/").addMenuItem(new MenuItem(1, "/a_a/b_b/"));
		System.out.println(directory.getMenuItem("/a_a/b_b/"));
	}
}
